home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 5907 < prev    next >
Encoding:
Text File  |  1996-08-05  |  5.2 KB  |  125 lines

  1. Newsgroups: comp.lang.c
  2. Path: uu4news.netcom.com!zodiac!szh
  3. From: szh@zcon.com (Syed Zaeem Hosain)
  4. Subject: Re: What to do when feof() is NOT feof()
  5. Message-ID: <1996Feb21.065129.10062@zcon.com>
  6. Sender: szh@zcon.com (Syed Zaeem Hosain)
  7. Nntp-Posting-Host: zodiac
  8. Reply-To: szh@zcon.com
  9. Organization: Z Consulting Group
  10. References: <4gb7r3$p4k@sun001.spd.dsccc.com>
  11. Date: Wed, 21 Feb 1996 06:51:29 GMT
  12.  
  13. In article <4gb7r3$p4k@sun001.spd.dsccc.com>, jmccarty@spd.dsccc.com (Mike McCarty) writes:
  14. >In article <1996Feb19.063026.29889@zcon.com>,
  15. >Syed Zaeem Hosain <szh@zcon.com> wrote:
  16. >
  17. >)I would have to differ. Dan has always offered *correct* advice when it
  18. >)is called for. While I do not necessarily always agree with his way of
  19. >)doing so, his point here is still well taken.
  20. >
  21. >This is false. On more than one occasion Dan has posted incorrect
  22. >information, and when challenged either just silently gone away, or
  23. >responded with verbal abuse.
  24.  
  25. Again, I guess I differ. In all the posts I have read from Dan, he has
  26. been right, albeit not tactful all the time. I believe in reading the
  27. content and not worrying too much about the phrasing in his posts.
  28.  
  29. >)When somebody is asking a question about something (that they are
  30. >)obviously unknowledgable or confused about), giving them incorrect
  31. >)answers only propagates the confusion. So please don't guess, please
  32. >)don't offer any incorrect suggestions, please don't confuse them
  33. >)further, etc.
  34. >
  35. >I think that guessing can be very helpful, myself. Especially when a
  36. >newbie has asked a "fuzzy" question. Then guessing things like
  37. >
  38. >    I think that you are using an MSDOS machine; if so then...
  39. >
  40. >        or
  41. >
  42. >    assuming you meant ... then ...
  43. >
  44. >can be very useful. And in any case, where does the charter of this
  45. >newsgroup state that only bona fide, certified, Dan Pop-a-fied experts
  46. >are allowed to post responses? This is an UNMODERATED newsgroup.
  47.  
  48. If the user asks a fuzzy question, then it is perfectly fair to preface
  49. with the appropriate questions to get more information and provide a
  50. good answer, but to make incorrect general statements about the
  51. language only misleads the original query originator.
  52.  
  53. >)>I may not be an expert but I know if you open a file with fopen( 
  54. >)>"filename", "rt"), then fgets stops reading when it finds a ascii 26 and 
  55. >)>signals end-of-file. If you open it with fopen( "filename","rb") it reads until 
  56. >)>the real end-of-file. I noticed in your smart-ass reply you did not offer any 
  57. >)>answers to his problem. Maybe you should take you own advice.
  58. >)
  59. >)On my SunOS system, there is no such ascii 26 byte denoting end of file
  60. >)and fgets will *not* terminate in this manner. The point is that by
  61. >)making such incorrect responses (like you did by insisting on this
  62. >)point) is just plain wrong. It has nothing to do with the language or
  63. >)how the end of files are denoted in most operating systems. Even in
  64. >)PC's running MSDOS, there is no such requirement that there *must* be
  65. >)an ascii 26 at the end of text files. Certain editors (Brief is an
  66. >)example. microEMacs is another) can easily be configured to create such
  67. >)ascii files without this byte.
  68. >
  69. >His response is not incorrect. It is just incomplete. There is a
  70. >difference.
  71.  
  72. Perhaps. But I'd argue that the incompleteness, particular in this
  73. case, makes it incorrect since it is very misleading. So I prefer to
  74. call it "incorrect".
  75.  
  76. >But calling someone an idiot is incorrect.
  77.  
  78. Here I take objection. I did not call *anyone* an idiot - where in
  79. my posts do you see that?
  80.  
  81. >)Note that even the EOF result returned (look in stdio.h) has nothing to
  82. >)do with the actual byte at the end of the file.
  83. >
  84. >Yes, it does, on some systems. This is a very strong statement for you
  85. >to make, especially in light of the next statement.
  86.  
  87. Okay, I stand corrected - it was a bit strong. So let me change it
  88. appropriately: *as far as I know*, on many systems, the EOF result as
  89. mentioned in stdio.h is -1 (and I will be the first to admit that this
  90. is not a requirement per se).
  91.  
  92. But *I* have not seen any system where the actual last byte in files
  93. *has* to be -1 or, for that matter, the *same* as the value of the
  94. define of EOF in stdio.h. Can you please provide some examples of
  95. systems where this is indeed true?
  96.  
  97. >)The bottom line still is: please do not offer answers if you do not
  98. >)know the correct answer.
  99. >
  100. >Ah, I see. Do as I say, not as I do. Since you offered answers here
  101. >which are not correct.
  102.  
  103. Please feel free to provide me with exact corrections - I am always
  104. willing to listen and learn. But "you are wrong" comments, without
  105. any further clarification or explanation, does not mean much to me.
  106.  
  107. >It would be a lot calmer and more fun to read this group if people could
  108. >treat each other with a normal dose of courtesy.
  109.  
  110. Certainly. But I'd say that I was a heck of a lot more polite in my
  111. responses than you, no?
  112.  
  113. And it would be even more fun if all the posts were discussing the C
  114. language, so I am going to shut up on this particular thread now. (And
  115. the crowd roars out their approval! :-))
  116.  
  117.                                 Z
  118.  
  119.  
  120. -- 
  121. -------------------------------------------------------------------------
  122. | Syed Zaeem Hosain          P. O. Box 610097            (408) 441-7021 |
  123. | Z Consulting Group        San Jose, CA 95161             szh@zcon.com |
  124. -------------------------------------------------------------------------
  125.